package com.yyyit.bg2.tools;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.logging.log4j.Logger;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class tools {

	public static void wait(int a) {
		try {
			Thread.sleep(a * 1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

	}

	public static String time8() {
		Date d = new Date();
		DateFormat sdf = new SimpleDateFormat("MMddHHmm");
		return sdf.format(d);
	}

	public static WebElement placeholder(WebDriver driver, String placeholder) {
		return driver.findElement(By.xpath("//input[@placeholder='"+placeholder+"']"));
	}
	
//	public   static  WebElement placeholder(WebDriver driver, String type, String placeholder) {
//		return driver.findElement(By.xpath("//"++"[@placeholder='"+placeholder+"']"));
//	}
}
